Optimal. Leaf size=37 \[ \frac {x}{a^2}+\frac {\cot (c+d x)}{a^2 d}-\frac {\cot ^3(c+d x)}{3 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4205, 3554, 8}
\begin {gather*} -\frac {\cot ^3(c+d x)}{3 a^2 d}+\frac {\cot (c+d x)}{a^2 d}+\frac {x}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3554
Rule 4205
Rubi steps
\begin {align*} \int \frac {1}{\left (a-a \sec ^2(c+d x)\right )^2} \, dx &=\frac {\int \cot ^4(c+d x) \, dx}{a^2}\\ &=-\frac {\cot ^3(c+d x)}{3 a^2 d}-\frac {\int \cot ^2(c+d x) \, dx}{a^2}\\ &=\frac {\cot (c+d x)}{a^2 d}-\frac {\cot ^3(c+d x)}{3 a^2 d}+\frac {\int 1 \, dx}{a^2}\\ &=\frac {x}{a^2}+\frac {\cot (c+d x)}{a^2 d}-\frac {\cot ^3(c+d x)}{3 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.03, size = 36, normalized size = 0.97 \begin {gather*} -\frac {\cot ^3(c+d x) \, _2F_1\left (-\frac {3}{2},1;-\frac {1}{2};-\tan ^2(c+d x)\right )}{3 a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 34, normalized size = 0.92
method | result | size |
derivativedivides | \(\frac {\arctan \left (\tan \left (d x +c \right )\right )-\frac {1}{3 \tan \left (d x +c \right )^{3}}+\frac {1}{\tan \left (d x +c \right )}}{d \,a^{2}}\) | \(34\) |
default | \(\frac {\arctan \left (\tan \left (d x +c \right )\right )-\frac {1}{3 \tan \left (d x +c \right )^{3}}+\frac {1}{\tan \left (d x +c \right )}}{d \,a^{2}}\) | \(34\) |
risch | \(\frac {x}{a^{2}}+\frac {4 i \left (3 \,{\mathrm e}^{4 i \left (d x +c \right )}-3 \,{\mathrm e}^{2 i \left (d x +c \right )}+2\right )}{3 d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}\) | \(53\) |
norman | \(\frac {\frac {x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {1}{24 a d}+\frac {5 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}-\frac {5 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}+\frac {\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )}{24 a d}}{a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}\) | \(98\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 40, normalized size = 1.08 \begin {gather*} \frac {\frac {3 \, {\left (d x + c\right )}}{a^{2}} + \frac {3 \, \tan \left (d x + c\right )^{2} - 1}{a^{2} \tan \left (d x + c\right )^{3}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 75 vs.
\(2 (35) = 70\).
time = 3.52, size = 75, normalized size = 2.03 \begin {gather*} \frac {4 \, \cos \left (d x + c\right )^{3} + 3 \, {\left (d x \cos \left (d x + c\right )^{2} - d x\right )} \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )}{3 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {1}{\sec ^{4}{\left (c + d x \right )} - 2 \sec ^{2}{\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 80 vs.
\(2 (35) = 70\).
time = 0.44, size = 80, normalized size = 2.16 \begin {gather*} \frac {\frac {24 \, {\left (d x + c\right )}}{a^{2}} + \frac {15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}} + \frac {a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.41, size = 31, normalized size = 0.84 \begin {gather*} \frac {x}{a^2}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2-\frac {1}{3}}{a^2\,d\,{\mathrm {tan}\left (c+d\,x\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________